package com.store.orm.mysql.crud.filter;

/**
 * 操作符,记录了一些常用的关于 MySQL 的操作符
 *
 * @author 宫静雨
 * @version 1.0
 */
public enum Operator {
    EQ(" = "),
    GT(" > "),
    LT(" < "),
    GTE(" >= "),
    LTE(" <= "),
    NE(" != "),
    ANE(" <> "),
    AND(" AND "),
    OR(" OR "),
    NOT(" NOT "),
    IS_NULL(" IS NULL "),
    IS_NOT_NULL(" IS NOT NULL"),
    IN(" IN "),
    NOT_INT(" NOT IN"),
    LIKE(" LIKE "),
    NOT_LIKE(" NOT LIKE "),
    REGEXP(" REGEXP "),
    NOT_REGEXP(" NOT REGEXP "),
    BETWEEN(" BETWEEN "),
    NOT_BETWEEN(" NOT BETWEEN "),
    ASC(" ASC "),
    DESC(" DESC ");
    public String operator;

    Operator(String operator) {
        this.operator = operator;
    }

    @Override
    public String toString() {
        return this.operator;
    }
}